Climate Change Analysis

Sri Gautham Subramani

Objective

  • The Objective of this topic is to discuss the changes in climate.
  • To study the variations in the temperatures along a period of time.
  • To render the results visually with the help of R.

Data Sources

Setting up the Data

  • For this particular data, there was not much cleaning to do as the source website automatically takes care of that
  • In addition, manipulation of data was necessary to pull the annual reports and to view the seasonal trends corresponding to every year.

Initial Analysis

globe$dt <- as.Date(globe$dt, format = "%Y-%m-%d")
globe$year <- as.numeric(format(globe$dt, "%Y"))
globe$month <- as.numeric(format(globe$dt,"%m"))
globe$month_text <- month.abb[globe$month]
globe[,c(10,11,12)]
##       year month month_text
##    1: 1750     1        Jan
##    2: 1750     2        Feb
##    3: 1750     3        Mar
##    4: 1750     4        Apr
##    5: 1750     5        May
##   ---                      
## 3188: 2015     8        Aug
## 3189: 2015     9        Sep
## 3190: 2015    10        Oct
## 3191: 2015    11        Nov
## 3192: 2015    12        Dec

Change is Global Temperature

## `geom_smooth()` using method = 'loess'

Examining United States

## # A tibble: 6 x 2
##    Year  Temp
##   <int> <dbl>
## 1  1851 10.4 
## 2  1852 10.0 
## 3  1853 10.4 
## 4  1854 10.8 
## 5  1855 10.6 
## 6  1856  9.49

Year Wise plot of Temperature in USA

## `geom_smooth()` using method = 'loess'

Glimpse of 1850 and 2013

data_general <- us_state_data[,c(1,4,6)]
data_general <- data_general %>%
  group_by(Year,State) %>%
  summarise(value=mean(AverageTemperature))
colnames(data_general)[2]<- "region"
data_general$region<-tolower(data_general$region)
data_2013 <- data_general %>%
  filter(Year==2013)
data_2013<-data_2013[,2:3]

data_1850 <- data_general %>%
  filter(Year==1850)
data_1850<-data_1850[,2:3]

Choroplethr of the Temperature in 1850

print(state_choropleth(data_1850,
                       title="Land Temperature 1850", 
                       num_colors = 8,
                       legend="Degrees"),reference_map=TRUE)

Choroplethr of the Temperature in 2013

print(state_choropleth(data_2013,
                       title="Land Temperature 2013", 
                       num_colors = 8,
                       legend="Degrees"),reference_map=TRUE)

Overall Cange in Temperature over Years

globe_2 <- globe_1[, lapply(.SD, mean),by=year, .SDcols= c("LandAverageTemperature","LandMaxTemperature","LandMinTemperature","LandAndOceanAverageTemperature","LandAndOceanAverageTemperatureUncertainty","LandAverageTemperatureUncertainty","LandMaxTemperatureUncertainty","LandMinTemperatureUncertainty")]
head(globe_2)
##    year LandAverageTemperature LandMaxTemperature LandMinTemperature
## 1: 1850               7.900667           13.47667           1.964333
## 2: 1851               8.178583           13.08100           2.203917
## 3: 1852               8.100167           13.39733           2.337000
## 4: 1853               8.041833           13.88658           1.892500
## 5: 1854               8.210500           13.97742           1.762167
## 6: 1855               8.110750           13.49317           1.702833
##    LandAndOceanAverageTemperature
## 1:                       14.86717
## 2:                       14.99183
## 3:                       15.00650
## 4:                       14.95517
## 5:                       14.99100
## 6:                       15.02108
##    LandAndOceanAverageTemperatureUncertainty
## 1:                                 0.3081667
## 2:                                 0.3120833
## 3:                                 0.3164167
## 4:                                 0.2838333
## 5:                                 0.2764167
## 6:                                 0.2911667
##    LandAverageTemperatureUncertainty LandMaxTemperatureUncertainty
## 1:                         0.8764167                      2.394833
## 2:                         0.8819167                      2.397250
## 3:                         0.9182500                      2.619250
## 4:                         0.8350000                      2.095083
## 5:                         0.8256667                      1.783333
## 6:                         0.8871667                      1.331417
##    LandMinTemperatureUncertainty
## 1:                      1.571167
## 2:                      1.632417
## 3:                      1.382917
## 4:                      1.355583
## 5:                      1.357000
## 6:                      1.655333

Plot of Overall Change

High Level View of Climate Change

Global Temperatures